#!/usr/bin/env python
#author sunforgetive@gmail.com
#2012-07-17

import cgi
import datetime
import webapp2
import httplib
import sys


reload(sys)
sys.setdefaultencoding('utf8')
from google.appengine.ext import db
from google.appengine.api import users

class SingleUrl(db.Model):
  id=db.StringProperty()
  path=db.StringProperty(multiline=True)
  date = db.DateTimeProperty(auto_now_add=True)

class Path(db.Model):
    id=db.StringProperty()
    path=db.StringProperty()
    date=db.DateTimeProperty(auto_now_add=True)

#SingleUrl(id='1',path='www.114pt.net/').put()
class Results(db.Model):
    id=db.IntegerProperty()
    root_path=db.StringProperty()
    path=db.StringProperty()
    status=db.IntegerProperty()
    reason=db.StringProperty()
    date=db.DateTimeProperty(auto_now_add=True)
    
def initData():        
    Path(id="6",path="/robots.txt").put()
    Path(id="7",path="editor").put()
    Path(id="8",path="FCKeditor").put()
    Path(id="9",path="eWebEditor").put()
    Path(id="10",path="CuteSoft_Client").put()
    Path(id="11",path="CuteEditor").put()
    Path(id="12",path="CuteSoft_Client/CuteEditor").put()
    Path(id="13",path="admin/CuteSoft_Client/CuteEditor").put()
    Path(id="14",path="admin.asp?action=login").put()
    Path(id="15",path="qq/admin.asp?action=login").put()
    Path(id="16",path="admin/qq/admin.asp?action=login").put()
    Path(id="17",path="logi.asp").put()
    Path(id="18",path="/admin").put()
    Path(id="19",path="/admin/login.asp").put()
    Path(id="20",path="/admin/index.asp").put()
    Path(id="21",path="/admin/admin_login.asp").put()
    Path(id="22",path="/admin/admin_index.asp").put()
    Path(id="23",path="/admin/admin.asp").put()
    Path(id="24",path="admin/addtwnews.asp").put()
    Path(id="25",path="addtwnews.asp").put()
    Path(id="26",path="admin/addtunews.asp").put()
    Path(id="27",path="addtunews.asp").put()
    Path(id="28",path="/admin/default.asp").put()
    Path(id="29",path="/admin/admin_loginls.asp").put()
    Path(id="30",path="/jcwy/login.asp").put()
    Path(id="31",path="/admin/sys_login.asp").put()
    Path(id="32",path="/manage").put()
    Path(id="33",path="/manage/login.asp").put()
    Path(id="34",path="/manage/admin_index.asp").put()
    Path(id="35",path="/manage/admin_login.asp").put()
    Path(id="36",path="/manage/index.asp").put()
    Path(id="37",path="/manage/System").put()
    Path(id="38",path="/manage/System/index.asp").put()
    Path(id="39",path="/login").put()
    Path(id="40",path="/login.asp").put()
    Path(id="41",path="/login.htm").put()
    Path(id="42",path="/login.html").put()
    Path(id="43",path="/master").put()
    Path(id="44",path="/master/login.asp").put()
    Path(id="45",path="/master/main.asp").put()
    Path(id="46",path="/data").put()
    Path(id="47",path="/data/login.asp").put()
    Path(id="48",path="/adm").put()
    Path(id="49",path="/ad_login.asp").put()
    Path(id="50",path="/adm_login.asp").put()
    Path(id="51",path="/admin.asp").put()
    Path(id="52",path="/admin_login.asp").put()
    Path(id="53",path="/admin_index.asp").put()
    Path(id="54",path="/adminlogin.asp").put()
    Path(id="55",path="/adminuser.asp").put()
    Path(id="56",path="/admin_user.asp").put()
    Path(id="57",path="/manage.asp").put()
    Path(id="58",path="/manage_index.asp").put()
    Path(id="59",path="/user").put()
    Path(id="60",path="/userlogin.asp").put()
    Path(id="61",path="/admpast.asp").put()
    Path(id="62",path="/root").put()
    Path(id="63",path="/member").put()
    Path(id="64",path="/Admin_pj").put()
    Path(id="65",path="/Admin_pj/Admin_login.asp").put()
    Path(id="66",path="/webmaster").put()
    Path(id="67",path="/webmaster/index.asp").put()
    Path(id="68",path="/admin1151").put()
    Path(id="69",path="/admin1151/login.asp").put()
    Path(id="70",path="/admin/manager.asp").put()
    Path(id="71",path="/a_main.asp").put()
    Path(id="72",path="/ad").put()
    Path(id="73",path="/ad.asp").put()
    Path(id="74",path="/ad_login.asp").put()
    Path(id="75",path="/admincp.asp").put()
    Path(id="76",path="/ad_manage.asp").put()
    Path(id="77",path="/addlb.asp").put()
    Path(id="78",path="/addmember.asp").put()
    Path(id="79",path="/adduser.asp").put()
    Path(id="80",path="/adm_login.asp").put()
    Path(id="81",path="/admin_admin").put()
    Path(id="82",path="/admin_admin.asp").put()
    Path(id="83",path="/Admin_BatchLink.asp").put()
    Path(id="84",path="/admin_del.asp").put()
    Path(id="85",path="/admin_delete.asp").put()
    Path(id="86",path="/admin_edit.asp").put()
    Path(id="87",path="/admin_index").put()
    Path(id="88",path="/admin_login").put()
    Path(id="89",path="/admin_main.asp").put()
    Path(id="90",path="/Admin_SoftInfo.asp").put()
    Path(id="91",path="/admin_user").put()
    Path(id="92",path="/admin_user.asp").put()
    Path(id="93",path="/admin1").put()
    Path(id="94",path="/admin123").put()
    Path(id="95",path="/admin1.asp").put()
    Path(id="96",path="/admin888").put()
    Path(id="97",path="/admin888.asp").put()
    Path(id="98",path="/adminadduser.asp").put()
    Path(id="99",path="/adminadmin").put()
    Path(id="100",path="/admindel.asp").put()
    Path(id="101",path="/admindelete.asp").put()
    Path(id="102",path="/adminedit.asp").put()
    Path(id="103",path="/adminindex").put()
    Path(id="104",path="/administrator").put()
    Path(id="105",path="/adminmember.asp").put()
    Path(id="106",path="/adminuserlogin").put()
    Path(id="107",path="/adminuserlogin.asp").put()
    Path(id="108",path="/adminlogin").put()
    Path(id="109",path="/adminlogin.asp").put()
    Path(id="110",path="/admintab.asp").put()
    Path(id="111",path="/adminuser").put()
    Path(id="112",path="/chkadmin.asp").put()
    Path(id="113",path="/chklogin.asp").put()
    Path(id="114",path="/denglu").put()
    Path(id="115",path="/denglu.asp").put()
    Path(id="116",path="/edituser.asp").put()
    Path(id="117",path="/editmember.asp").put()
    Path(id="118",path="/indexadmin").put()
    Path(id="119",path="/index_admin").put()
    Path(id="120",path="/index_admin.asp").put()
    Path(id="121",path="/index_manage.asp").put()
    Path(id="122",path="/guanli").put()
    Path(id="123",path="/guanli.asp").put()
    Path(id="124",path="/guanli-cn.asp").put()
    Path(id="125",path="/houtai").put()
    Path(id="126",path="/houtai.asp").put()
    Path(id="127",path="/houtaiguanli").put()
    Path(id="128",path="/houtaiguanli.asp").put()
    Path(id="129",path="/htgl").put()
    Path(id="130",path="/htgl.asp").put()
    Path(id="131",path="/login_admin.asp").put()
    Path(id="132",path="/login_out.asp").put()
    Path(id="133",path="/logout.asp").put()
    Path(id="134",path="/main.asp").put()
    Path(id="135",path="/members").put()
    Path(id="136",path="/manage_index").put()
    Path(id="137",path="/manage_index.asp").put()
    Path(id="138",path="/member.asp").put()
    Path(id="139",path="/members.asp").put()
    Path(id="140",path="/register.asp").put()
    Path(id="141",path="/users").put()
    Path(id="142",path="/users.asp").put()
    Path(id="143",path="/11111/index.asp").put()
    Path(id="144",path="/88888/index.asp").put()
    Path(id="145",path="/ad_admin/admin_login.asp").put()
    Path(id="146",path="/admin/adm_menu.asp").put()
    Path(id="147",path="/admin/admin_6list.asp").put()
    Path(id="148",path="/admin/manage.asp").put()
    Path(id="149",path="/admin/news.asp").put()
    Path(id="150",path="/admin/Select_feedback.asp").put()
    Path(id="151",path="/adsystem/index.asp").put()
    Path(id="152",path="/asp/admin/login.asp").put()
    Path(id="153",path="/back/login.asp").put()
    Path(id="154",path="/college/index.asp").put()
    Path(id="155",path="/Console/login/").put()
    Path(id="156",path="/gb/register.asp").put()
    Path(id="157",path="/guestbook/man.asp").put()
    Path(id="158",path="/ht").put()
    Path(id="159",path="/login/login.asp").put()
    Path(id="160",path="/manager/left.asp").put()
    Path(id="161",path="/new/admin_index.asp").put()
    Path(id="162",path="/office/login.asp").put()
    Path(id="163",path="/Product/manage/login.asp").put()
    Path(id="164",path="/show/back/index.asp").put()
    Path(id="165",path="/trade/admin/Login.asp").put()
    Path(id="166",path="/webadmin").put()
    Path(id="167",path="/weihu/login.asp").put()
    Path(id="168",path="/xtadmin/").put()
    Path(id="169",path="/sys.asp").put()
    Path(id="170",path="/sys").put()
    Path(id="171",path="/system.asp").put()
    Path(id="172",path="/ststems").put()
    Path(id="173",path="/systems.asp").put()
    Path(id="174",path="/aspcheck.asp").put()
    Path(id="175",path="/bbs/admin_index.asp").put()
    Path(id="176",path="/article/admin/admin.asp").put()
    Path(id="177",path="/admin/aspcheck.asp").put()
    Path(id="178",path="/inc/config.asp").put()
    Path(id="179",path="/eWebEditor/admin_login.asp").put()
    Path(id="180",path="/eWebEditor/db/ewebeditor.mdb").put()
    Path(id="181",path="/db/ewebeditor.mdb").put()
    Path(id="182",path="/editor/admin_login.asp").put()
    Path(id="183",path="SlHot_Editor").put()
    Path(id="184",path="SlHot_Editor/admin_login.asp").put()
    Path(id="185",path="SlHot_Editor/db/ewebeditor.mdb").put()
    Path(id="186",path="FCKeditor/editor/filemanager/browser/default/connectors/test.html").put()
    Path(id="187",path="FCKeditor/editor/filemanager/upload/test.html").put()
    Path(id="188",path="FCKeditor/editor/filemanager/connectors/test.html").put()
    Path(id="189",path="FCKeditor/editor/filemanager/connectors/uploadtest.html").put()
    Path(id="190",path="Editors/filemanager/browser/default/browser.html").put()
    Path(id="191",path="FCKeditor/filemanager/browser/default/browser.html").put()
    Path(id="192",path="FCKeditor/filemanager/browser/default/browser.html?Type=&Connector=connectors/asp/connector.asp").put()
    Path(id="193",path="Southidceditor/Admin_Style.asp").put()
    Path(id="194",path="Admin_Style.asp").put()
    Path(id="195",path="admin/Southidceditor/Admin_Style.asp").put()
    Path(id="196",path="/houtai.asp").put()
    Path(id="197",path="/admin_php.asp").put()
    Path(id="198",path="/myalibabainfo/Login.asp").put()
    Path(id="199",path="/xuegongjin.asp").put()
    Path(id="200",path="/siyu/manage/admin_login.asp").put()
    Path(id="201",path="/manage/login.asp").put()
    Path(id="202",path="/sxang_Manage/login.asp").put()
    Path(id="203",path="/msm/login.asp").put()
    Path(id="204",path="/xbyadmin").put()
    Path(id="205",path="/EC_Admin/EC_AdminLogin.asp").put()
    Path(id="206",path="/system/default.html").put()
    Path(id="207",path="/sd_login.asp").put()
    Path(id="208",path="/hiadmin").put()
    Path(id="209",path="/EduAdmin/Admin_Login.asp").put()
    Path(id="210",path="/admin/Admin_index.asp").put()
    Path(id="211",path="/admin/get_your_passport.asp").put()
    Path(id="212",path="/xgjy_admin/admin_login.asp").put()
    Path(id="213",path="/HomeManagement/Login.asp").put()
    Path(id="214",path="/Admin/Admin_Login.asp").put()
    Path(id="215",path="/Manage/Default.asp").put()
   
    Path(id="217",path="/AdminCenter/AdminLogin.asp").put()
    Path(id="218",path="/adminruan/index.asp").put()
    Path(id="219",path="/admin/adminlogin.asp").put()
    Path(id="220",path="/Manager/default.asp").put()
    Path(id="221",path="/admin_m/login.asp").put()
    Path(id="222",path="/manager/default.asp").put()
    Path(id="223",path="/SearchManage").put()
    Path(id="224",path="/Administration/Default.asp").put()
    Path(id="225",path="/adminlogin.asp").put()
    Path(id="226",path="/Neeao_sql_admin.asp").put()
    Path(id="227",path="/public").put()
    Path(id="228",path="/WebSiteAdminister").put()
    Path(id="229",path="/bbs/upfile.asp").put()
    Path(id="230",path="/data/dvbbs7.mdb").put()
    Path(id="231",path="/databackup/dvbbs7.mdb").put()
    Path(id="232",path="/upfile.asp").put()
    Path(id="233",path="/inc/conn.asp").put()
    Path(id="234",path="/data/qcdn_news.mdb").put()
    Path(id="235",path="/friend.mdb").put()
    Path(id="236",path="/db/6k.mdb").put()
    Path(id="237",path="/databackup/dvbbs6.mdb").put()
    Path(id="238",path="/databackup/dvbbs5.mdb").put()
    Path(id="239",path="/databackup/#dvbbs7.asp").put()
    Path(id="240",path="/data/#dvbbs7.asp").put()
    Path(id="241",path="/down_default.asp").put()
    Path(id="242",path="/down_addsoft.asp").put()
    Path(id="243",path="/bbs/down_picupload.asp").put()
    Path(id="244",path="/down_picupload.asp").put()
    Path(id="245",path="/dvbbs/upfile.asp").put()
    Path(id="246",path="/forum/upfile.asp").put()
    Path(id="247",path="/upfile_soft.asp").put()
    Path(id="248",path="/upload_soft.asp").put()
    Path(id="249",path="/blog/upfile.asp").put()
    Path(id="250",path="/admin/admin_backup.asp").put()
    Path(id="251",path="/bbs/z_visual_upfile.asp").put()
    Path(id="252",path="/bbs/databackup/dvbbs7.mdb").put()
    Path(id="253",path="/admin_index").put()
    Path(id="254",path="/admin_admin").put()
    Path(id="255",path="/index_admin").put()
    Path(id="256",path="/admin/index").put()
    Path(id="257",path="/admin/default").put()
    Path(id="258",path="/admin/manage").put()
    Path(id="259",path="/admin/login").put()
    Path(id="260",path="/admin/index").put()
    Path(id="261",path="/admin/default").put()
    Path(id="262",path="/admin/manage").put()
    Path(id="263",path="/admin/login").put()
    Path(id="264",path="/admin/fuckyou").put()
    Path(id="265",path="/manage_index").put()
    Path(id="266",path="/index_manage").put()
    Path(id="267",path="/wocaonima").put()
    Path(id="268",path="/admin1").put()
    Path(id="269",path="/admin_login").put()
    Path(id="270",path="/login_admin").put()
    Path(id="271",path="/ad_login").put()
    Path(id="272",path="/ad_manage").put()
    Path(id="273",path="/count").put()
    Path(id="274",path="/manager").put()
    Path(id="275",path="/guanli").put()
    Path(id="276",path="/denglu").put()
    Path(id="277",path="/houtai").put()
    Path(id="278",path="/houtaiguanli").put()
    Path(id="279",path="/htgl").put()
    Path(id="280",path="/adminlogin").put()
    Path(id="281",path="/adminuserlogin").put()
    Path(id="282",path="/admin_login").put()
    Path(id="283",path="/adm_login").put()
    Path(id="284",path="/chklogin").put()
    Path(id="285",path="/chkadmin").put()
    Path(id="286",path="/adduser").put()
    Path(id="287",path="/adminuser").put()
    Path(id="288",path="/admin_user").put()
    Path(id="289",path="/edituser").put()
    Path(id="290",path="/adduser").put()
    Path(id="291",path="/adminadduser").put()
    Path(id="292",path="/editmember").put()
    Path(id="293",path="/adminmember").put()
    Path(id="294",path="/addmember").put()
    Path(id="295",path="/logout").put()
    Path(id="296",path="/exit").put()
    Path(id="297",path="/login_out").put()
    Path(id="298",path="/edit").put()
    Path(id="299",path="/adminedit").put()
    Path(id="300",path="/admin_edit").put()
    Path(id="301",path="/delete").put()
    Path(id="302",path="/admindelete").put()
    Path(id="303",path="/admin_delete").put()
    Path(id="304",path="/del").put()
    Path(id="305",path="/admindel").put()
    Path(id="306",path="/admin_del").put()
    Path(id="307",path="/up").put()
    Path(id="308",path="/upfile").put()
    Path(id="309",path="/backup").put()
    Path(id="310",path="/config").put()
    Path(id="311",path="/test").put()
    Path(id="312",path="/webmaster").put()
    Path(id="313",path="/root").put()
    Path(id="314",path="/aadmin").put()
    Path(id="315",path="/admintab").put()
    Path(id="316",path="/admin_main").put()
    Path(id="317",path="/main").put()
    Path(id="318",path="/art").put()
    Path(id="319",path="/article").put()
    Path(id="320",path="/databases").put()
    Path(id="321",path="/database").put()
    Path(id="322",path="/dbase").put()
    Path(id="323",path="/devel").put()
    Path(id="324",path="/file").put()
    Path(id="325",path="/files").put()
    Path(id="326",path="/forum").put()
    Path(id="327",path="/girl").put()
    Path(id="328",path="/girls").put()
    Path(id="329",path="/htdocs").put()
    Path(id="330",path="/htdocs").put()
    Path(id="331",path="/idea").put()
    Path(id="332",path="/ideas").put()
    Path(id="333",path="/include").put()
    Path(id="334",path="/includeinc").put()
    Path(id="335",path="/includes").put()
    Path(id="336",path="/incoming").put()
    Path(id="337",path="/install").put()
    Path(id="338",path="/manual").put()
    Path(id="339",path="/misc").put()
    Path(id="340",path="/mrtg").put()
    Path(id="341",path="/private").put()
    Path(id="342",path="/program").put()
    Path(id="343",path="/programming").put()
    Path(id="344",path="/programs").put()
    Path(id="345",path="/secret").put()
    Path(id="346",path="/secrets").put()
    Path(id="347",path="/server_stats").put()
    Path(id="348",path="/server-info").put()
    Path(id="349",path="/server-status").put()
    Path(id="350",path="/set").put()
    Path(id="351",path="/setting").put()
    Path(id="352",path="/setup").put()
    Path(id="353",path="/***").put()
    Path(id="354",path="/snmp").put()
    Path(id="355",path="/source").put()
    Path(id="356",path="/sources").put()
    Path(id="357",path="/sql").put()
    Path(id="358",path="/stat").put()
    Path(id="359",path="/statistics").put()
    Path(id="360",path="/Stats").put()
    Path(id="361",path="/stats").put()
    Path(id="362",path="/telephone").put()
    Path(id="363",path="/temp").put()
    Path(id="364",path="/temporary").put()
    Path(id="365",path="/tool").put()
    Path(id="366",path="/tools").put()
    Path(id="367",path="/usage").put()
    Path(id="368",path="/weblog").put()
    Path(id="369",path="/weblogs").put()
    Path(id="370",path="/webstats").put()
    Path(id="371",path="/work").put()
    Path(id="372",path="/wstats").put()
    Path(id="373",path="/wwwlog").put()
    Path(id="374",path="/wwwstats").put()
    Path(id="375",path="/www").put()
    Path(id="376",path="/wenzhang").put()
    Path(id="377",path="/admin1").put()
    Path(id="378",path="/admin888").put()
    Path(id="379",path="/administrator").put()
    Path(id="380",path="/adminadmin").put()
    Path(id="381",path="/admin_admin").put()
    Path(id="382",path="/adminindex").put()
    Path(id="383",path="/admin_index").put()
    Path(id="384",path="/indexadmin").put()
    Path(id="385",path="/index_admin").put()
    Path(id="386",path="/adminuser").put()
    Path(id="387",path="/admin_user").put()
    Path(id="388",path="/adminlogin").put()
    Path(id="389",path="/admin_login").put()
    Path(id="390",path="/adminuserlogin").put()
    Path(id="391",path="/manage_index").put()
    Path(id="392",path="/guanli").put()
    Path(id="393",path="/denglu").put()
    Path(id="394",path="/houtai").put()
    Path(id="395",path="/houtaiguanli").put()
    Path(id="396",path="/htgl").put()
    Path(id="397",path="/index_admin.asp").put()
    Path(id="398",path="/manage_index.asp").put()
    Path(id="399",path="/index_manage.asp").put()
    Path(id="400",path="/admin1.asp").put()
    Path(id="401",path="/admin888.asp").put()
    Path(id="402",path="/login_admin.asp").put()
    Path(id="403",path="/ad.asp").put()
    Path(id="404",path="/ad_login.asp").put()
    Path(id="405",path="/ad_manage.asp").put()
    Path(id="406",path="/manager.asp").put()
    Path(id="407",path="/guanli.asp").put()
    Path(id="408",path="/denglu.asp").put()
    Path(id="409",path="/houtai.asp").put()
    Path(id="410",path="/houtaiguanli.asp").put()
    Path(id="411",path="/htgl.asp").put()
    Path(id="412",path="/adminlogin.asp").put()
    Path(id="413",path="/adminuserlogin.asp").put()
    Path(id="414",path="/adm_login.asp").put()
    Path(id="415",path="/users.asp").put()
    Path(id="416",path="/admin_user.asp").put()
    Path(id="417",path="/edituser.asp").put()
    Path(id="418",path="/adminadduser.asp").put()
    Path(id="419",path="/member.asp").put()
    Path(id="420",path="/members.asp").put()
    Path(id="421",path="/editmember.asp").put()
    Path(id="422",path="/adminmember.asp").put()
    Path(id="423",path="/addmember.asp").put()
    Path(id="424",path="/login_out.asp").put()
    Path(id="425",path="/admindelete.asp").put()
    Path(id="426",path="/admin_delete.asp").put()
    Path(id="427",path="/admin_del.asp").put()
    Path(id="428",path="/admintab.asp").put()
    Path(id="429",path="/admin/adm_menu.asp").put()
    Path(id="430",path="/inside").put()
    Path(id="431",path="/Console/login").put()
    Path(id="432",path="/Console/login").put()
    Path(id="433",path="/ht").put()
    Path(id="434",path="/guanli-cn.asp").put()
    Path(id="435",path="/manage/login.asp").put()
    Path(id="436",path="/11111/index.asp").put()
    Path(id="437",path="/88888/index.asp").put()
    Path(id="438",path="/college/index.asp").put()
    Path(id="439",path="/login/login.asp").put()
    Path(id="440",path="/adsystem/index.asp").put()
    Path(id="441",path="/weihu/login.asp").put()
    Path(id="442",path="/back/login.asp").put()
    Path(id="443",path="/eadmin/login.asp").put()
    Path(id="444",path="/asp/admin/login.asp").put()
    Path(id="445",path="/manager/left.asp").put()
    Path(id="446",path="/addlb.asp").put()
    Path(id="447",path="/office/login.asp").put()
    Path(id="448",path="/guestbook/man.asp").put()
    Path(id="449",path="/admin/admin_6list.asp").put()
    Path(id="450",path="/show/back/index.asp").put()
    Path(id="451",path="/ad_admin/admin_login.asp").put()
    Path(id="452",path="/Product/manage/login.asp").put()
    Path(id="453",path="/a_main.asp").put()
    Path(id="454",path="/trade/admin/Login.asp").put()
    Path(id="455",path="/new/admin_index.asp").put()
    Path(id="456",path="/Admin_BatchLink.asp").put()
    Path(id="457",path="/Admin_SoftInfo.asp").put()
    Path(id="458",path="/admin/Select_feedback.asp").put()
    Path(id="459",path="/gb/register.asp").put()
    Path(id="460",path="/law.com/admin_article/admin_login.asp").put()
    Path(id="461",path="/systems").put()
    Path(id="462",path="/systems.asp").put()
    Path(id="463",path="/system.asp").put()
    Path(id="464",path="/admin/admin_index.asp").put()
    Path(id="465",path="/admin/admin.asp").put()
    Path(id="466",path="/admin/admin_loginls.asp").put()
    Path(id="467",path="/admin/sys_login.asp").put()
    Path(id="468",path="/manage/login.asp").put()
    Path(id="469",path="/manage/admin_index.asp").put()
    Path(id="470",path="/manage/admin_login.asp").put()
    Path(id="471",path="/manage/System").put()
    Path(id="472",path="/manage/System/index.asp").put()
    Path(id="473",path="/login.htm").put()
    Path(id="474",path="/login.html").put()
    Path(id="475",path="/master").put()
    Path(id="476",path="/master/login.asp").put()
    Path(id="477",path="/master/main.asp").put()
    Path(id="478",path="/data/login.asp").put()
    Path(id="479",path="/adm").put()
    Path(id="480",path="/ad_login.asp").put()
    Path(id="481",path="/adm_login.asp").put()
    Path(id="482",path="/adminlogin.asp").put()
    Path(id="483",path="/admin_user.asp").put()
    Path(id="484",path="/manage_index.asp").put()
    Path(id="485",path="/userlogin.asp").put()
    Path(id="486",path="/admpast.asp").put()
    Path(id="487",path="/root").put()
    Path(id="488",path="/Admin_pj").put()
    Path(id="489",path="/Admin_pj/Admin_login.asp").put()
    Path(id="490",path="/webmaster").put()
    Path(id="491",path="/webmaster/index.asp").put()
    Path(id="492",path="/admin1151").put()
    Path(id="493",path="/admin1151/login.asp").put()
    Path(id="494",path="/admin/manager.asp").put()
    Path(id="495",path="/a_main.asp").put()
    Path(id="496",path="/ad.asp").put()
    Path(id="497",path="/ad_login.asp").put()
    Path(id="498",path="/admincp.asp").put()
    Path(id="499",path="/ad_manage.asp").put()
    Path(id="500",path="/addlb.asp").put()
    Path(id="501",path="/addmember.asp").put()
    Path(id="502",path="/adm_login.asp").put()
    Path(id="503",path="/admin_admin").put()
    Path(id="504",path="/Admin_BatchLink.asp").put()
    Path(id="505",path="/admin_del.asp").put()
    Path(id="506",path="/admin_delete.asp").put()
    Path(id="507",path="/admin_index").put()
    Path(id="508",path="/admin_login").put()
    Path(id="509",path="/Admin_SoftInfo.asp").put()
    Path(id="510",path="/admin_user").put()
    Path(id="511",path="/admin_user.asp").put()
    Path(id="512",path="/admin1").put()
    Path(id="513",path="/admin123").put()
    Path(id="514",path="/admin1.asp").put()
    Path(id="515",path="/admin888").put()
    Path(id="516",path="/admin888.asp").put()
    Path(id="517",path="/adminadduser.asp").put()
    Path(id="518",path="/adminadmin").put()
    Path(id="519",path="/admindelete.asp").put()
    Path(id="520",path="/adminindex").put()
    Path(id="521",path="/administrator").put()
    Path(id="522",path="/adminmember.asp").put()
    Path(id="523",path="/adminuserlogin").put()
    Path(id="524",path="/adminuserlogin.asp").put()
    Path(id="525",path="/adminlogin").put()
    Path(id="526",path="/adminlogin.asp").put()
    Path(id="527",path="/admintab.asp").put()
    Path(id="528",path="/adminuser").put()
    Path(id="529",path="/denglu").put()
    Path(id="530",path="user.asp").put()
    Path(id="531",path="/denglu.asp").put()
    Path(id="532",path="/edituser.asp").put()
    Path(id="533",path="/editmember.asp").put()
    Path(id="534",path="/indexadmin").put()
    Path(id="535",path="/index_admin").put()
    Path(id="536",path="/index_admin.asp").put()
    Path(id="537",path="/index_manage.asp").put()
    Path(id="538",path="/guanli").put()
    Path(id="539",path="/guanli.asp").put()
    Path(id="540",path="/guanli-cn.asp").put()
    Path(id="541",path="/houtai").put()
    Path(id="542",path="/houtai.asp").put()
    Path(id="543",path="/houtaiguanli").put()
    Path(id="544",path="/houtaiguanli.asp").put()
    Path(id="545",path="/htgl").put()
    Path(id="546",path="/htgl.asp").put()
    Path(id="547",path="/login_admin.asp").put()
    Path(id="548",path="/login_out.asp").put()
    Path(id="549",path="/manager.asp").put()
    Path(id="550",path="/manage_index").put()
    Path(id="551",path="/manage_index.asp").put()
    Path(id="552",path="/11111/index.asp").put()
    Path(id="553",path="/88888/index.asp").put()
    Path(id="554",path="/ad_admin/admin_login.asp").put()
    Path(id="555",path="/admin/adm_menu.asp").put()
    Path(id="556",path="/admin/admin_6list.asp").put()
    Path(id="557",path="/admin/Select_feedback.asp").put()
    Path(id="558",path="/adsystem/index.asp").put()
    Path(id="559",path="/asp/admin/login.asp").put()
    Path(id="560",path="/back/login.asp").put()
    Path(id="561",path="/college/index.asp").put()
    Path(id="562",path="/Console/login/").put()
    Path(id="563",path="/gb/register.asp").put()
    Path(id="564",path="/guestbook/man.asp").put()
    Path(id="565",path="/login/login.asp").put()
    Path(id="566",path="/manager/left.asp").put()
    Path(id="567",path="/new/admin_index.asp").put()
    Path(id="568",path="/office/login.asp").put()
    Path(id="569",path="/Product/manage/login.asp").put()
    Path(id="570",path="/show/back/index.asp").put()
    Path(id="571",path="/trade/admin/Login.asp").put()
    Path(id="572",path="/weihu/login.asp").put()
    Path(id="573",path="/xtadmin").put()
    Path(id="574",path="/system/").put()
    Path(id="575",path="/system.asp").put()
    Path(id="576",path="/systems.asp").put()
    Path(id="577",path="/bbs/admin_index.asp").put()
    Path(id="578",path="/article/admin/admin.asp").put()
    Path(id="579",path="/admin/aspcheck.asp").put()
    Path(id="580",path="/eWebEditor/admin_login.asp").put()
    Path(id="581",path="/eWebEditor/db/ewebeditor.mdb").put()
    Path(id="582",path="/db/ewebeditor.mdb").put()
    Path(id="583",path="/houtai.asp").put()
    Path(id="584",path="/admin_php.asp").put()
    Path(id="585",path="/myalibabainfo/Login.asp").put()
    Path(id="586",path="/xuegongjin.asp").put()
    Path(id="587",path="/siyu/manage/admin_login.asp").put()
    Path(id="588",path="/manage/login.asp").put()
    Path(id="589",path="/sxang_Manage/login.asp").put()
    Path(id="590",path="/msm/login.asp").put()
    Path(id="591",path="/EC_Admin/EC_AdminLogin.asp").put()
    Path(id="592",path="/system/default.html").put()
    Path(id="593",path="/sd_login.asp").put()
    Path(id="594",path="/EduAdmin/Admin_Login.asp").put()
    Path(id="595",path="/admin/Admin_index.asp").put()
    Path(id="596",path="/admin/get_your_passport.asp").put()
    Path(id="597",path="/xgjy_admin/admin_login.asp").put()
    Path(id="598",path="/HomeManagement/Login.asp").put()
    Path(id="599",path="/Admin/Admin_Login.asp").put()
    Path(id="600",path="/Manage/Default.asp").put()
   
    Path(id="602",path="/AdminCenter/AdminLogin.asp").put()
    Path(id="603",path="/adminruan/index.asp").put()
    Path(id="604",path="/admin/adminlogin.asp").put()
    Path(id="605",path="/Manager/default.asp").put()
    Path(id="606",path="/admin_m/login.asp").put()
    Path(id="607",path="/manager/default.asp").put()
    Path(id="608",path="/SearchManage").put()
    Path(id="609",path="/Administration/Default.asp").put()
    Path(id="610",path="/admin/admin.asp").put()
    Path(id="611",path="/adminlogin.asp").put()
    Path(id="612",path="adadmin").put()
    Path(id="613",path="/WebSiteAdminister").put()
    Path(id="614",path="/Manage/index.htm").put()
    Path(id="615",path="/E_Manage_ejsj_H/Login.asp").put()
    Path(id="616",path="/kczl_admin/login.asp").put()
    Path(id="617",path="/bafangmaster/logincp.asp").put()
    Path(id="618",path="/ewebeditor/").put()
    Path(id="619",path="/ewebeditor/admin_login.asp").put()
    Path(id="620",path="/ewebeditor/adminlogin.asp").put()
    Path(id="621",path="/ewebeditor/login.asp").put()
    Path(id="622",path="/ewebeditor/admin.asp").put()
    Path(id="623",path="/ewebeditor/db/ewebeditor.mdb").put()
    Path(id="624",path="/ewebeditor/db/ewebeditor.mdb").put()
    Path(id="625",path="/ewebeditor/db/ewebeditor.asp").put()
    Path(id="626",path="/ewebeditor/db/#ewebeditor.mdb").put()
    Path(id="627",path="/ewebeditor/db/#ewebeditor.mdb").put()
    Path(id="628",path="/ewebeditor/db/!@#ewebeditor.asp").put()
    Path(id="629",path="/ewebeditor/db/ewebeditor1033.mdb").put()
    Path(id="630",path="/ewebeditor/admin_style.asp").put()
    Path(id="631",path="/ewebeditor/ewebeditor.asp?id=article_content&style=Full_v200").put()
    Path(id="632",path="/ewebeditor/admin_uploadfile.asp").put()
    Path(id="633",path="/ewebeditor/admin/upload.asp").put()
    Path(id="634",path="/admin/Ku_Login.asp").put()
    Path(id="635",path="2004").put()
    Path(id="636",path="Admin").put()
    Path(id="637",path="admin_index").put()
    Path(id="638",path="admin_admin").put()
    Path(id="639",path="index_admin").put()
    Path(id="640",path="admin/index").put()
    Path(id="641",path="admin/default").put()
    Path(id="642",path="admin/manage").put()
    Path(id="643",path="admin/login").put()
    Path(id="644",path="manage_index").put()
    Path(id="645",path="index_manage").put()
    Path(id="646",path="superadmin").put()
    Path(id="647",path="admin1").put()
    Path(id="648",path="admin_login").put()
    Path(id="649",path="login_admin").put()
    Path(id="650",path="ad_login").put()
    Path(id="651",path="ad_manage").put()
    Path(id="652",path="guanli").put()
    Path(id="653",path="denglu").put()
    Path(id="654",path="houtai").put()
    Path(id="655",path="xtwh").put()
    Path(id="656",path="houtaiguanli").put()
    Path(id="657",path="htgl").put()
    Path(id="658",path="adminlogin").put()
    Path(id="659",path="adminuserlogin").put()
    Path(id="660",path="adm_login").put()
    Path(id="661",path="chklogin").put()
    Path(id="662",path="chkadmin").put()
    Path(id="663",path="admin_user").put()
    Path(id="664",path="edituser").put()
    Path(id="665",path="adminadduser").put()
    Path(id="666",path="editmember").put()
    Path(id="667",path="adminmember").put()
    Path(id="668",path="addmember").put()
    Path(id="669",path="logout").put()
    Path(id="670",path="exit").put()
    Path(id="671",path="login_out").put()
    Path(id="672",path="adminedit").put()
    Path(id="673",path="admin_edit").put()
    Path(id="674",path="delete").put()
    Path(id="675",path="admindelete").put()
    Path(id="676",path="admin_delete").put()
    Path(id="677",path="up").put()
    Path(id="678",path="upload").put()
    Path(id="679",path="upfile").put()
    Path(id="680",path="webmaster").put()
    Path(id="681",path="root").put()
    Path(id="682",path="aadmin").put()
    Path(id="683",path="admintab").put()
    Path(id="684",path="admin_main").put()
    Path(id="685",path="art").put()
    Path(id="686",path="db").put()
    Path(id="687",path="dbase").put()
    Path(id="688",path="devel").put()
    Path(id="689",path="files").put()
    Path(id="690",path="girl").put()
    Path(id="691",path="girls").put()
    Path(id="692",path="htdocs").put()
    Path(id="693",path="idea").put()
    Path(id="694",path="ideas").put()
    Path(id="695",path="includeinc").put()
    Path(id="696",path="incoming").put()
    Path(id="697",path="install").put()
    Path(id="698",path="manual").put()
    Path(id="699",path="misc").put()
    Path(id="700",path="mrtg").put()
    Path(id="701",path="private").put()
    Path(id="702",path="program").put()
    Path(id="703",path="programming").put()
    Path(id="704",path="secret").put()
    Path(id="705",path="secrets").put()
    Path(id="706",path="server_stats").put()
    Path(id="707",path="set").put()
    Path(id="708",path="setting").put()
    Path(id="709",path="setup").put()
    Path(id="710",path="snmp").put()
    Path(id="711",path="source").put()
    Path(id="712",path="sources").put()
    Path(id="713",path="sql").put()
    Path(id="714",path="statistics").put()
    Path(id="715",path="Stats").put()
    Path(id="716",path="temporary").put()
    Path(id="717",path="tool").put()
    Path(id="718",path="tools").put()
    Path(id="719",path="weblog").put()
    Path(id="720",path="weblogs").put()
    Path(id="721",path="webstats").put()
    Path(id="722",path="wstats").put()
    Path(id="723",path="wwwlog").put()
    Path(id="724",path="wwwstats").put()
    Path(id="725",path="wenzhang").put()
    Path(id="726",path="bbs/admin_index.asp").put()
    Path(id="727",path="article/admin/admin.asp").put()
    Path(id="728",path="admin/aspcheck.asp").put()
    Path(id="729",path="eWebEditor/admin_login.asp").put()
    Path(id="730",path="houtai.asp").put()
    Path(id="731",path="login/login").put()
    Path(id="732",path="login/index").put()
    Path(id="733",path="login/super").put()
    Path(id="734",path="sys_admin").put()
    Path(id="735",path="login1").put()
    Path(id="736",path="update").put()
    Path(id="737",path="count_admin").put()
    Path(id="738",path="add_admin").put()
    Path(id="739",path="admin_pass").put()
    Path(id="740",path="newbbs/login").put()
    Path(id="741",path="down/login").put()
    Path(id="742",path="bbs/admin/login").put()
    Path(id="743",path="main/login").put()
    Path(id="744",path="manage/login.asp").put()
    Path(id="745",path="conn.asp").put()
    Path(id="746",path="readme.txt").put()

    Path(id="767",path="/admin/FCKeditor/").put()

    Path(id="769",path="/editor/upload.asp").put()

    Path(id="771",path="/CmsEditor/Upload.asp").put()

    Path(id="773",path="/bbs/upfile.asp").put()

    Path(id="775",path="/forum/upfile.asp").put()

    Path(id="777",path="/dvbbs/upfile.asp").put()

    Path(id="779",path="/upfile_soft.asp").put()

    Path(id="781",path="/upload.asp?action=upfile").put()

    Path(id="783",path="/bbs/down_addsoft.asp").put()

    Path(id="785",path="/bbs/down_picupfile.asp").put()

    Path(id="787",path="/down_picupload.asp").put()

    Path(id="789",path="/admin/admin_upfile.asp").put()

    Path(id="791",path="/admin/upfile.asp").put()

    Path(id="793",path="/admin/upload.asp").put()

    Path(id="795",path="/admin/uploadfaceok.asp").put()

    Path(id="797",path="/admin/upfile.asp").put()

    Path(id="799",path="/admin_upfile.asp").put()


    Path(id="802",path="/user_upfile.asp").put()

    Path(id="805",path="/upload_flash.asp").put()

    Path(id="807",path="/Saveannounce_upload.asp").put()

    Path(id="809",path="/UploadFace.asp").put()

    Path(id="811",path="v1.1").put()
    Path(id="812",path="/bbs/diy.asp").put()

    Path(id="814",path="/UploadSoft/diy.asp").put()

    Path(id="816",path="/diy.asp").put()

    Path(id="818",path="/upload/upload.asp").put()

    Path(id="820",path="/mybbs/saveup.asp").put()

    Path(id="822",path="/dxxobbs/upload.asp").put()

    Path(id="824",path="/img_upfile.asp").put()

    Path(id="826",path="/Upfile_SoftPic.asp").put()

    Path(id="828",path="/upfile_flash.asp").put()

    Path(id="830",path="phpmyadmin").put()
    Path(id="831",path="php_admin").put()
    Path(id="832",path="include/config.inc.asp").put()
    Path(id="833",path="include/config.asp").put()
    Path(id="834",path="lib/config.asp").put()
    Path(id="835",path="left.asp").put()
    Path(id="836",path="right.asp").put()
    Path(id="837",path="top.asp").put()
    Path(id="838",path="bottom.asp").put()
    Path(id="839",path="admin/left.asp").put()
    Path(id="840",path="admin/right.asp").put()
    Path(id="841",path="admin/top.asp").put()
    Path(id="842",path="admin/bottom.asp").put()
    Path(id="843",path="Syscode/databank/ReasonIn2005.mdb").put()
    Path(id="844",path="databank/ReasonIn2005.mdb").put()
    Path(id="845",path="ReasonIn2005.mdb").put()
    Path(id="846",path="Syscode/RISys_conn.asp").put()
    Path(id="847",path="RISys_conn.asp").put()
    Path(id="848",path="manager/pages/login/login.asp").put()
    Path(id="849",path="pages/login/login.asp").put()
    Path(id="850",path="login/login.asp").put()
    Path(id="851",path="super_web.asp").put()
    Path(id="852",path="glwyly").put()
    Path(id="853",path="glwyly/login.asp").put()
    Path(id="854",path="guanli/guanli_lgoin.asp").put()
    Path(id="855",path="guanli_lgoin.asp").put()
    Path(id="856",path="console").put()
    Path(id="857",path="console/login").put()
    Path(id="858",path="console/login/LoginForm.asp").put()
    Path(id="859",path="HX_LOGIN.ASP").put()
    Path(id="860",path="oa1").put()
    Path(id="861",path="c_admin").put()
    Path(id="862",path="web_ts").put()
    Path(id="863",path="web_ts/admin").put()
    Path(id="864",path="siteadmin").put()
    Path(id="865",path="guestbook").put()
    Path(id="866",path="book").put()
    Path(id="867",path="guest").put()
    
class MainPage(webapp2.RequestHandler):
  def get(self):
    self.response.out.write('<html><body><h1>welcome to web page!<h1></body><html>')    
  

class SingleUrlAdd(webapp2.RequestHandler):
           
  def post(self):   #    self.test()
    greeting = SingleUrl()    
    greeting.id = self.request.get('id')
    greeting.path = self.request.get('path')
    greeting.put()
    self.redirect('/')


class PathAdd(webapp2.RequestHandler):
    def post(self):   #    self.test()
        direc = Path()    
        direc.id = self.request.get('id')
        direc.path = self.request.get('path')
        direc.put()
        self.redirect('/')
        
class InitData(webapp2.RequestHandler):
    def get(self):
        op= self.request.get('op')
        if op:
            initData();
            
            
            
class TableOp(webapp2.RequestHandler):
    def get(self):
        name=self.request.get('name')
        op=self.request.get('op')
        sql=self.request.get('sql')
        self.response.out.write('<html><body>')
        if name=='Path':
            if op=='select':
                if sql:
                 contents = db.GqlQuery(sql)
                 for content in contents:
                     if content.id:
                        self.response.out.write('<div>ID:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp;' %content.id )   
                        self.response.out.write('Path:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp; ' %content.path)
                        self.response.out.write('Date:<b>%s</b><br /></div>' %content.date)
                 self.response.out.write('<div><h1>Total:%s</h1></div>' %contents.count())
                        
            elif op=='add':
                self.response.out.write("""
                <form action="/Pathadd" method="post">
                <div><b>ID:</b><input type="text" name="id" ></input></div>
                <div><b>URL Address:</b><input type="text" name="path" ></input></div>
                <div><input type="submit" value="Add"></div>
                </form>""")
            elif op=='delete':
                if sql:
                    content=db.GqlQuery(sql)
                    if content:
                         db.delete(content)
                         self.response.out.write('<h1>delete success!</h1><h2>sql:</h2><h2>%s</h2>' %sql)
                    self.response.out.write('<div><h1>Total:%s</h1></div>' %content.count())
                         
        elif name=='Results':
            if op=='select':
                if sql:
                  contents = db.GqlQuery(sql)
                  for content in contents:
                     if content.path:
                        self.response.out.write('<div>Id:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp;' %content.id )
                        self.response.out.write('<div>Path:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp;' %content.path )   
                        self.response.out.write('Status:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp; ' %content.status)
                        self.response.out.write('Reason:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp;' %content.reason)
                        self.response.out.write('Date:<b>%s</b><br /></div>' %content.date)
                        
                self.response.out.write('<div><h1>Total:%s</h1></div>' %contents.count())
            elif op=='delete':
                if sql:
                    content=db.GqlQuery(sql)
                    if content:
                         db.delete(content)
                         self.response.out.write('<h1>delete success!</h1><h2>sql:</h2><h2>%s</h2>' %sql)
                    self.response.out.write('<div><h1>Total:%s</h1></div>' %content.count())
                    
        elif name=='SingleUrl':
             if op=='select':
                if sql:
                 contents = db.GqlQuery(sql)
                 for content in contents:
                     if content.id:
                        self.response.out.write('<div>ID:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp;' %content.id )   
                        self.response.out.write('URL:<b>%s</b>&nbsp;&nbsp;&nbsp;&nbsp; ' %content.path)
                        self.response.out.write('Date:<b>%s</b><br /></div>' %content.date)
                        
                self.response.out.write('<div><h1>Total:%s</h1></div>' %contents.count())
                        
             elif op=='add':
                self.response.out.write("""
                  <form action="/singleurladd" method="post">
                  <div><b>ID:</b><input type="text" name="id" ></input></div>
                  <div><b>URL Address:</b><input type="text" name="path" ></input></div>
                  <div><input type="submit" value="write"></div>
                  </form>
                  </body>
                  </html>""")
             elif op=='delete':
                if sql:
                    content=db.GqlQuery(sql)
                    if content:
                         db.delete(content)
                         self.response.out.write('<h1>delete success!</h1><h2>sql:</h2><h2>%s</h2>' %sql)
                    self.response.out.write('<div><h1>Total:%s</h1></div>' %content.count())
                
            
        self.response.out.write('</body></html>')
        
class RunCal(webapp2.RequestHandler):
    def get(self):
        op=self.request.get('op')
        if op:
            urls=db.GqlQuery('select * from SingleUrl')
            Paths=db.GqlQuery('select * from Path')
            count=0
            for url in urls:
                for path in Paths:
                    count=+1
                    self.scan(url.path, path.path,count)
                    
                
            
    def scan(self,url,path,count):    
        conn = httplib.HTTPConnection(url,80)  
        conn.request('GET',path)   
        resp =  conn.getresponse() 
        result=Results()
        result.id=count
        result.root_path=url
        result.path=url+path       
        result.status=resp.status
        result.reason=resp.reason
        result.put()
#        print  'status = ' ,   resp.status 
#        print  'reason = ' ,   resp.reason 
#        print 'HTTP Headers:' 
#        for hdr in resp.getheaders(): 
#            print  ' %s: % s '  %hdr



app = webapp2.WSGIApplication([
  ('/',MainPage),  
  ('/init',InitData),
  ('/run',RunCal),
  ('/table',TableOp),
  ('/singleurladd', SingleUrlAdd),
  ('/Pathadd',PathAdd)
], debug=True)
